import Vue from "vue";
import zh_CN from "@/utils/validate/zh_CN"; // 重置vee-validate zh_CN.js
import VeeValidate, { Validator } from "vee-validate";

Vue.use(VeeValidate);
Validator.localize("zh_CN", zh_CN); // 自定义中文提示  与Validator.extend()有顺序关系
Validator.extend("mobile", {
  getMessage: field => field + "格式不对",
  validate: value =>
    value.length == 11 && /^((13|14|15|17|18)[0-9]{1}\d{8})$/.test(value)
});

export default {};
